package com.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class FeignConfigBean {
    @Bean(name = "RestTemplate2")
    @LoadBalanced // ribbon的进程式LB负载均衡，默认轮询，只有一个数据库看不出来
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
